package com.rlz.base.util.download.bean;


import com.rlz.base.util.download.config.InnerConstant;

import java.io.Serializable;

/**
 * Created by RLZ
 * on 2021/4/22
 */
public class RequestInfo implements Serializable {

    private int dictate;   //下载的控制状态

    private DownloadInfo downloadInfo;

    public RequestInfo() {
    }


    public int getDictate() {
        return dictate;
    }

    public void setDictate(int dictate) {
        this.dictate = dictate;
    }

    public DownloadInfo getDownloadInfo() {
        return downloadInfo;
    }

    public void setDownloadInfo(DownloadInfo downloadInfo) {
        this.downloadInfo = downloadInfo;
    }


    @Override
    public String toString() {
        return "RequestInfo{" +
                "dictate=" + getRequestDictateDesc(dictate) +
                ", downloadInfo=" + downloadInfo +
                '}';
    }


    public String getRequestDictateDesc(int dictate) {
        switch (dictate) {
            case InnerConstant.Request.loading:
                return " loading ";
            case InnerConstant.Request.pause:
                return " pause ";
            default:
                return " dictate描述错误  ";
        }
    }
}
